<template>
  <div class="main-box" v-loading="loading">
    <div class="box-center">
      <img src= "@/assets/image/logo.png" class="logo" alt="">
      <div class="form">
        <input type="text" placeholder="请输入账号" class="ipt">
        <input type="password" placeholder="请输入密码" class="ipt">
      </div>
      <van-button color="#333" @click="submit" block>立即登录 </van-button>
    </div>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        loading:false
      }
    },
    methods:{
      submit(){
        this.loading=true
        setTimeout(()=>{
          this.$router.push('/').catch(err=>{})
        },1000)
      }
    }
  }
</script>

<style scoped lang="scss">
.main-box{
  height: 100vh;
  width: 100%;
  background: url('@/assets/image/bgk.jpeg') no-repeat;
  background-size: cover;
  display: flex;
  justify-content: center;
  align-items: center;
  .box-center{
    width: 300px;
    height: 400px;
    //background:#ffffff;
    border-radius: 5px;
    .logo{
      width: 300px;
      height: 50px;
      object-fit: cover ;
    }
    .form{
      width: 100%;
      margin-top: 40px;
      .ipt{
        width: 100%;
        height: 45px;
        border: 1px solid #b6b6b6;
        border-radius: 4px;
        font-size: 14px;
        text-indent: 30px;
        color: #ede7e7;
        margin-bottom: 25px;
      }
      .ipt::placeholder{
        color:#ede7e7;
      }
    }
  }
}
</style>

